// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   Google Cloud Key Management Service (KMS) API Version v1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://cloud.google.com/kms/'>Google Cloud Key Management Service (KMS) API</a>
 *      <tr><th>API Version<td>v1
 *      <tr><th>API Rev<td>20170316 (805)
 *      <tr><th>API Docs
 *          <td><a href='https://cloud.google.com/kms/'>
 *              https://cloud.google.com/kms/</a>
 *      <tr><th>Discovery Name<td>cloudkms
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Google Cloud Key Management Service (KMS) API can be found at
 * <a href='https://cloud.google.com/kms/'>https://cloud.google.com/kms/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.CloudKMS.v1
{
    /// <summary>The CloudKMS Service.</summary>
    public class CloudKMSService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public CloudKMSService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public CloudKMSService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            projects = new ProjectsResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "cloudkms"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://cloudkms.googleapis.com/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return ""; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the Google Cloud Key Management Service (KMS) API.</summary>
        public class Scope
        {
            /// <summary>View and manage your data across Google Cloud Platform services</summary>
            public static string CloudPlatform = "https://www.googleapis.com/auth/cloud-platform";

        }



        private readonly ProjectsResource projects;

        /// <summary>Gets the Projects resource.</summary>
        public virtual ProjectsResource Projects
        {
            get { return projects; }
        }
    }

    ///<summary>A base abstract class for CloudKMS requests.</summary>
    public abstract class CloudKMSBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new CloudKMSBaseServiceRequest instance.</summary>
        protected CloudKMSBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>V1 error format.</summary>
        [Google.Apis.Util.RequestParameterAttribute("$.xgafv", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<XgafvEnum> Xgafv { get; set; }

        /// <summary>V1 error format.</summary>
        public enum XgafvEnum
        {
            /// <summary>v1 error format</summary>
            [Google.Apis.Util.StringValueAttribute("1")]
            Value1,
            /// <summary>v2 error format</summary>
            [Google.Apis.Util.StringValueAttribute("2")]
            Value2,
        }

        /// <summary>OAuth access token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("access_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string AccessToken { get; set; }

        /// <summary>Data format for response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
            /// <summary>Media download with context-dependent Content-Type</summary>
            [Google.Apis.Util.StringValueAttribute("media")]
            Media,
            /// <summary>Responses with Content-Type of application/x-protobuf</summary>
            [Google.Apis.Util.StringValueAttribute("proto")]
            Proto,
        }

        /// <summary>OAuth bearer token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("bearer_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string BearerToken { get; set; }

        /// <summary>JSONP</summary>
        [Google.Apis.Util.RequestParameterAttribute("callback", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Callback { get; set; }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Pretty-print response.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("pp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> Pp { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>Legacy upload protocol for media (e.g. "media", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("uploadType", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadType { get; set; }

        /// <summary>Upload protocol for media (e.g. "raw", "multipart").</summary>
        [Google.Apis.Util.RequestParameterAttribute("upload_protocol", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UploadProtocol { get; set; }

        /// <summary>Initializes CloudKMS parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "$.xgafv", new Google.Apis.Discovery.Parameter
                {
                    Name = "$.xgafv",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "access_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "access_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "bearer_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "bearer_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "callback", new Google.Apis.Discovery.Parameter
                {
                    Name = "callback",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "pp", new Google.Apis.Discovery.Parameter
                {
                    Name = "pp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "uploadType", new Google.Apis.Discovery.Parameter
                {
                    Name = "uploadType",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "upload_protocol", new Google.Apis.Discovery.Parameter
                {
                    Name = "upload_protocol",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "projects" collection of methods.</summary>
    public class ProjectsResource
    {
        private const string Resource = "projects";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ProjectsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            locations = new LocationsResource(service);

        }

        private readonly LocationsResource locations;

        /// <summary>Gets the Locations resource.</summary>
        public virtual LocationsResource Locations
        {
            get { return locations; }
        }

        /// <summary>The "locations" collection of methods.</summary>
        public class LocationsResource
        {
            private const string Resource = "locations";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public LocationsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;
                keyRings = new KeyRingsResource(service);

            }

            private readonly KeyRingsResource keyRings;

            /// <summary>Gets the KeyRings resource.</summary>
            public virtual KeyRingsResource KeyRings
            {
                get { return keyRings; }
            }

            /// <summary>The "keyRings" collection of methods.</summary>
            public class KeyRingsResource
            {
                private const string Resource = "keyRings";

                /// <summary>The service which this resource belongs to.</summary>
                private readonly Google.Apis.Services.IClientService service;

                /// <summary>Constructs a new resource.</summary>
                public KeyRingsResource(Google.Apis.Services.IClientService service)
                {
                    this.service = service;
                    cryptoKeys = new CryptoKeysResource(service);

                }

                private readonly CryptoKeysResource cryptoKeys;

                /// <summary>Gets the CryptoKeys resource.</summary>
                public virtual CryptoKeysResource CryptoKeys
                {
                    get { return cryptoKeys; }
                }

                /// <summary>The "cryptoKeys" collection of methods.</summary>
                public class CryptoKeysResource
                {
                    private const string Resource = "cryptoKeys";

                    /// <summary>The service which this resource belongs to.</summary>
                    private readonly Google.Apis.Services.IClientService service;

                    /// <summary>Constructs a new resource.</summary>
                    public CryptoKeysResource(Google.Apis.Services.IClientService service)
                    {
                        this.service = service;
                        cryptoKeyVersions = new CryptoKeyVersionsResource(service);

                    }

                    private readonly CryptoKeyVersionsResource cryptoKeyVersions;

                    /// <summary>Gets the CryptoKeyVersions resource.</summary>
                    public virtual CryptoKeyVersionsResource CryptoKeyVersions
                    {
                        get { return cryptoKeyVersions; }
                    }

                    /// <summary>The "cryptoKeyVersions" collection of methods.</summary>
                    public class CryptoKeyVersionsResource
                    {
                        private const string Resource = "cryptoKeyVersions";

                        /// <summary>The service which this resource belongs to.</summary>
                        private readonly Google.Apis.Services.IClientService service;

                        /// <summary>Constructs a new resource.</summary>
                        public CryptoKeyVersionsResource(Google.Apis.Services.IClientService service)
                        {
                            this.service = service;

                        }


                        /// <summary>Create a new CryptoKeyVersion in a CryptoKey.
                        ///
                        /// The server will assign the next sequential id. If unset, state will be set to
                        /// ENABLED.</summary>
                        /// <param name="body">The body of the request.</param>
                        /// <param name="parent">Required. The name of the CryptoKey associated with the CryptoKeyVersions.</param>
                        public virtual CreateRequest Create(Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion body, string parent)
                        {
                            return new CreateRequest(service, body, parent);
                        }

                        /// <summary>Create a new CryptoKeyVersion in a CryptoKey.
                        ///
                        /// The server will assign the next sequential id. If unset, state will be set to
                        /// ENABLED.</summary>
                        public class CreateRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion>
                        {
                            /// <summary>Constructs a new Create request.</summary>
                            public CreateRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion body, string parent)
                                : base(service)
                            {
                                Parent = parent;
                                Body = body;
                                InitParameters();
                            }


                            /// <summary>Required. The name of the CryptoKey associated with the
                            /// CryptoKeyVersions.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("parent", Google.Apis.Util.RequestParameterType.Path)]
                            public virtual string Parent { get; private set; }


                            /// <summary>Gets or sets the body of this request.</summary>
                            Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion Body { get; set; }

                            ///<summary>Returns the body of the request.</summary>
                            protected override object GetBody() { return Body; }

                            ///<summary>Gets the method name.</summary>
                            public override string MethodName
                            {
                                get { return "create"; }
                            }

                            ///<summary>Gets the HTTP method.</summary>
                            public override string HttpMethod
                            {
                                get { return "POST"; }
                            }

                            ///<summary>Gets the REST path.</summary>
                            public override string RestPath
                            {
                                get { return "v1/{+parent}/cryptoKeyVersions"; }
                            }

                            /// <summary>Initializes Create parameter list.</summary>
                            protected override void InitParameters()
                            {
                                base.InitParameters();

                                RequestParameters.Add(
                                    "parent", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "parent",
                                        IsRequired = true,
                                        ParameterType = "path",
                                        DefaultValue = null,
                                        Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                    });
                            }

                        }

                        /// <summary>Schedule a CryptoKeyVersion for destruction.
                        ///
                        /// Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED and
                        /// destroy_time will be set to a time 24 hours in the future, at which point the state will be
                        /// changed to DESTROYED, and the key material will be irrevocably destroyed.
                        ///
                        /// Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the
                        /// process.</summary>
                        /// <param name="body">The body of the request.</param>
                        /// <param name="name">The resource name of the CryptoKeyVersion to destroy.</param>
                        public virtual DestroyRequest Destroy(Google.Apis.CloudKMS.v1.Data.DestroyCryptoKeyVersionRequest body, string name)
                        {
                            return new DestroyRequest(service, body, name);
                        }

                        /// <summary>Schedule a CryptoKeyVersion for destruction.
                        ///
                        /// Upon calling this method, CryptoKeyVersion.state will be set to DESTROY_SCHEDULED and
                        /// destroy_time will be set to a time 24 hours in the future, at which point the state will be
                        /// changed to DESTROYED, and the key material will be irrevocably destroyed.
                        ///
                        /// Before the destroy_time is reached, RestoreCryptoKeyVersion may be called to reverse the
                        /// process.</summary>
                        public class DestroyRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion>
                        {
                            /// <summary>Constructs a new Destroy request.</summary>
                            public DestroyRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.DestroyCryptoKeyVersionRequest body, string name)
                                : base(service)
                            {
                                Name = name;
                                Body = body;
                                InitParameters();
                            }


                            /// <summary>The resource name of the CryptoKeyVersion to destroy.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                            public virtual string Name { get; private set; }


                            /// <summary>Gets or sets the body of this request.</summary>
                            Google.Apis.CloudKMS.v1.Data.DestroyCryptoKeyVersionRequest Body { get; set; }

                            ///<summary>Returns the body of the request.</summary>
                            protected override object GetBody() { return Body; }

                            ///<summary>Gets the method name.</summary>
                            public override string MethodName
                            {
                                get { return "destroy"; }
                            }

                            ///<summary>Gets the HTTP method.</summary>
                            public override string HttpMethod
                            {
                                get { return "POST"; }
                            }

                            ///<summary>Gets the REST path.</summary>
                            public override string RestPath
                            {
                                get { return "v1/{+name}:destroy"; }
                            }

                            /// <summary>Initializes Destroy parameter list.</summary>
                            protected override void InitParameters()
                            {
                                base.InitParameters();

                                RequestParameters.Add(
                                    "name", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "name",
                                        IsRequired = true,
                                        ParameterType = "path",
                                        DefaultValue = null,
                                        Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$",
                                    });
                            }

                        }

                        /// <summary>Returns metadata for a given CryptoKeyVersion.</summary>
                        /// <param name="name">The name of the CryptoKeyVersion to get.</param>
                        public virtual GetRequest Get(string name)
                        {
                            return new GetRequest(service, name);
                        }

                        /// <summary>Returns metadata for a given CryptoKeyVersion.</summary>
                        public class GetRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion>
                        {
                            /// <summary>Constructs a new Get request.</summary>
                            public GetRequest(Google.Apis.Services.IClientService service, string name)
                                : base(service)
                            {
                                Name = name;
                                InitParameters();
                            }


                            /// <summary>The name of the CryptoKeyVersion to get.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                            public virtual string Name { get; private set; }


                            ///<summary>Gets the method name.</summary>
                            public override string MethodName
                            {
                                get { return "get"; }
                            }

                            ///<summary>Gets the HTTP method.</summary>
                            public override string HttpMethod
                            {
                                get { return "GET"; }
                            }

                            ///<summary>Gets the REST path.</summary>
                            public override string RestPath
                            {
                                get { return "v1/{+name}"; }
                            }

                            /// <summary>Initializes Get parameter list.</summary>
                            protected override void InitParameters()
                            {
                                base.InitParameters();

                                RequestParameters.Add(
                                    "name", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "name",
                                        IsRequired = true,
                                        ParameterType = "path",
                                        DefaultValue = null,
                                        Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$",
                                    });
                            }

                        }

                        /// <summary>Lists CryptoKeyVersions.</summary>
                        /// <param name="parent">Required. The resource name of the CryptoKey to list, in the format
                        /// `projects/locations/keyRings/cryptoKeys`.</param>
                        public virtual ListRequest List(string parent)
                        {
                            return new ListRequest(service, parent);
                        }

                        /// <summary>Lists CryptoKeyVersions.</summary>
                        public class ListRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.ListCryptoKeyVersionsResponse>
                        {
                            /// <summary>Constructs a new List request.</summary>
                            public ListRequest(Google.Apis.Services.IClientService service, string parent)
                                : base(service)
                            {
                                Parent = parent;
                                InitParameters();
                            }


                            /// <summary>Required. The resource name of the CryptoKey to list, in the format
                            /// `projects/locations/keyRings/cryptoKeys`.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("parent", Google.Apis.Util.RequestParameterType.Path)]
                            public virtual string Parent { get; private set; }

                            /// <summary>Optional pagination token, returned earlier via
                            /// ListCryptoKeyVersionsResponse.next_page_token.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                            public virtual string PageToken { get; set; }

                            /// <summary>Optional limit on the number of CryptoKeyVersions to include in the response.
                            /// Further CryptoKeyVersions can subsequently be obtained by including the
                            /// ListCryptoKeyVersionsResponse.next_page_token in a subsequent request. If unspecified,
                            /// the server will pick an appropriate default.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("pageSize", Google.Apis.Util.RequestParameterType.Query)]
                            public virtual System.Nullable<int> PageSize { get; set; }


                            ///<summary>Gets the method name.</summary>
                            public override string MethodName
                            {
                                get { return "list"; }
                            }

                            ///<summary>Gets the HTTP method.</summary>
                            public override string HttpMethod
                            {
                                get { return "GET"; }
                            }

                            ///<summary>Gets the REST path.</summary>
                            public override string RestPath
                            {
                                get { return "v1/{+parent}/cryptoKeyVersions"; }
                            }

                            /// <summary>Initializes List parameter list.</summary>
                            protected override void InitParameters()
                            {
                                base.InitParameters();

                                RequestParameters.Add(
                                    "parent", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "parent",
                                        IsRequired = true,
                                        ParameterType = "path",
                                        DefaultValue = null,
                                        Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                    });
                                RequestParameters.Add(
                                    "pageToken", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "pageToken",
                                        IsRequired = false,
                                        ParameterType = "query",
                                        DefaultValue = null,
                                        Pattern = null,
                                    });
                                RequestParameters.Add(
                                    "pageSize", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "pageSize",
                                        IsRequired = false,
                                        ParameterType = "query",
                                        DefaultValue = null,
                                        Pattern = null,
                                    });
                            }

                        }

                        /// <summary>Update a CryptoKeyVersion's metadata.
                        ///
                        /// state may be changed between ENABLED and DISABLED using this method. See
                        /// DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.</summary>
                        /// <param name="body">The body of the request.</param>
                        /// <param name="name">Output only. The resource name for this CryptoKeyVersion in the format
                        /// `projects/locations/keyRings/cryptoKeys/cryptoKeyVersions`.</param>
                        public virtual PatchRequest Patch(Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion body, string name)
                        {
                            return new PatchRequest(service, body, name);
                        }

                        /// <summary>Update a CryptoKeyVersion's metadata.
                        ///
                        /// state may be changed between ENABLED and DISABLED using this method. See
                        /// DestroyCryptoKeyVersion and RestoreCryptoKeyVersion to move between other states.</summary>
                        public class PatchRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion>
                        {
                            /// <summary>Constructs a new Patch request.</summary>
                            public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion body, string name)
                                : base(service)
                            {
                                Name = name;
                                Body = body;
                                InitParameters();
                            }


                            /// <summary>Output only. The resource name for this CryptoKeyVersion in the format
                            /// `projects/locations/keyRings/cryptoKeys/cryptoKeyVersions`.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                            public virtual string Name { get; private set; }

                            /// <summary>Required list of fields to be updated in this request.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("updateMask", Google.Apis.Util.RequestParameterType.Query)]
                            public virtual object UpdateMask { get; set; }


                            /// <summary>Gets or sets the body of this request.</summary>
                            Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion Body { get; set; }

                            ///<summary>Returns the body of the request.</summary>
                            protected override object GetBody() { return Body; }

                            ///<summary>Gets the method name.</summary>
                            public override string MethodName
                            {
                                get { return "patch"; }
                            }

                            ///<summary>Gets the HTTP method.</summary>
                            public override string HttpMethod
                            {
                                get { return "PATCH"; }
                            }

                            ///<summary>Gets the REST path.</summary>
                            public override string RestPath
                            {
                                get { return "v1/{+name}"; }
                            }

                            /// <summary>Initializes Patch parameter list.</summary>
                            protected override void InitParameters()
                            {
                                base.InitParameters();

                                RequestParameters.Add(
                                    "name", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "name",
                                        IsRequired = true,
                                        ParameterType = "path",
                                        DefaultValue = null,
                                        Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$",
                                    });
                                RequestParameters.Add(
                                    "updateMask", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "updateMask",
                                        IsRequired = false,
                                        ParameterType = "query",
                                        DefaultValue = null,
                                        Pattern = null,
                                    });
                            }

                        }

                        /// <summary>Restore a CryptoKeyVersion in the DESTROY_SCHEDULED, state.
                        ///
                        /// Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time
                        /// will be cleared.</summary>
                        /// <param name="body">The body of the request.</param>
                        /// <param name="name">The resource name of the CryptoKeyVersion to restore.</param>
                        public virtual RestoreRequest Restore(Google.Apis.CloudKMS.v1.Data.RestoreCryptoKeyVersionRequest body, string name)
                        {
                            return new RestoreRequest(service, body, name);
                        }

                        /// <summary>Restore a CryptoKeyVersion in the DESTROY_SCHEDULED, state.
                        ///
                        /// Upon restoration of the CryptoKeyVersion, state will be set to DISABLED, and destroy_time
                        /// will be cleared.</summary>
                        public class RestoreRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKeyVersion>
                        {
                            /// <summary>Constructs a new Restore request.</summary>
                            public RestoreRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.RestoreCryptoKeyVersionRequest body, string name)
                                : base(service)
                            {
                                Name = name;
                                Body = body;
                                InitParameters();
                            }


                            /// <summary>The resource name of the CryptoKeyVersion to restore.</summary>
                            [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                            public virtual string Name { get; private set; }


                            /// <summary>Gets or sets the body of this request.</summary>
                            Google.Apis.CloudKMS.v1.Data.RestoreCryptoKeyVersionRequest Body { get; set; }

                            ///<summary>Returns the body of the request.</summary>
                            protected override object GetBody() { return Body; }

                            ///<summary>Gets the method name.</summary>
                            public override string MethodName
                            {
                                get { return "restore"; }
                            }

                            ///<summary>Gets the HTTP method.</summary>
                            public override string HttpMethod
                            {
                                get { return "POST"; }
                            }

                            ///<summary>Gets the REST path.</summary>
                            public override string RestPath
                            {
                                get { return "v1/{+name}:restore"; }
                            }

                            /// <summary>Initializes Restore parameter list.</summary>
                            protected override void InitParameters()
                            {
                                base.InitParameters();

                                RequestParameters.Add(
                                    "name", new Google.Apis.Discovery.Parameter
                                    {
                                        Name = "name",
                                        IsRequired = true,
                                        ParameterType = "path",
                                        DefaultValue = null,
                                        Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+/cryptoKeyVersions/[^/]+$",
                                    });
                            }

                        }
                    }

                    /// <summary>Create a new CryptoKey within a KeyRing.
                    ///
                    /// CryptoKey.purpose is required.</summary>
                    /// <param name="body">The body of the request.</param>
                    /// <param name="parent">Required. The name of the KeyRing associated with the CryptoKeys.</param>
                    public virtual CreateRequest Create(Google.Apis.CloudKMS.v1.Data.CryptoKey body, string parent)
                    {
                        return new CreateRequest(service, body, parent);
                    }

                    /// <summary>Create a new CryptoKey within a KeyRing.
                    ///
                    /// CryptoKey.purpose is required.</summary>
                    public class CreateRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKey>
                    {
                        /// <summary>Constructs a new Create request.</summary>
                        public CreateRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.CryptoKey body, string parent)
                            : base(service)
                        {
                            Parent = parent;
                            Body = body;
                            InitParameters();
                        }


                        /// <summary>Required. The name of the KeyRing associated with the CryptoKeys.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("parent", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Parent { get; private set; }

                        /// <summary>Required. It must be unique within a KeyRing and match the regular expression
                        /// `[a-zA-Z0-9_-]{1,63}`</summary>
                        [Google.Apis.Util.RequestParameterAttribute("cryptoKeyId", Google.Apis.Util.RequestParameterType.Query)]
                        public virtual string CryptoKeyId { get; set; }


                        /// <summary>Gets or sets the body of this request.</summary>
                        Google.Apis.CloudKMS.v1.Data.CryptoKey Body { get; set; }

                        ///<summary>Returns the body of the request.</summary>
                        protected override object GetBody() { return Body; }

                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "create"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "POST"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+parent}/cryptoKeys"; }
                        }

                        /// <summary>Initializes Create parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "parent", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "parent",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$",
                                });
                            RequestParameters.Add(
                                "cryptoKeyId", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "cryptoKeyId",
                                    IsRequired = false,
                                    ParameterType = "query",
                                    DefaultValue = null,
                                    Pattern = null,
                                });
                        }

                    }

                    /// <summary>Decrypt data that was protected by Encrypt.</summary>
                    /// <param name="body">The body of the request.</param>
                    /// <param name="name">Required. The resource name of the CryptoKey to use for decryption. The server will choose the
                    /// appropriate version.</param>
                    public virtual DecryptRequest Decrypt(Google.Apis.CloudKMS.v1.Data.DecryptRequest body, string name)
                    {
                        return new DecryptRequest(service, body, name);
                    }

                    /// <summary>Decrypt data that was protected by Encrypt.</summary>
                    public class DecryptRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.DecryptResponse>
                    {
                        /// <summary>Constructs a new Decrypt request.</summary>
                        public DecryptRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.DecryptRequest body, string name)
                            : base(service)
                        {
                            Name = name;
                            Body = body;
                            InitParameters();
                        }


                        /// <summary>Required. The resource name of the CryptoKey to use for decryption. The server will
                        /// choose the appropriate version.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Name { get; private set; }


                        /// <summary>Gets or sets the body of this request.</summary>
                        Google.Apis.CloudKMS.v1.Data.DecryptRequest Body { get; set; }

                        ///<summary>Returns the body of the request.</summary>
                        protected override object GetBody() { return Body; }

                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "decrypt"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "POST"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+name}:decrypt"; }
                        }

                        /// <summary>Initializes Decrypt parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "name", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "name",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                });
                        }

                    }

                    /// <summary>Encrypt data, so that it can only be recovered by a call to Decrypt.</summary>
                    /// <param name="body">The body of the request.</param>
                    /// <param name="name">Required. The resource name of the CryptoKey or CryptoKeyVersion to use for encryption.
                    ///
                    /// If a CryptoKey is specified, the server will use its primary version.</param>
                    public virtual EncryptRequest Encrypt(Google.Apis.CloudKMS.v1.Data.EncryptRequest body, string name)
                    {
                        return new EncryptRequest(service, body, name);
                    }

                    /// <summary>Encrypt data, so that it can only be recovered by a call to Decrypt.</summary>
                    public class EncryptRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.EncryptResponse>
                    {
                        /// <summary>Constructs a new Encrypt request.</summary>
                        public EncryptRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.EncryptRequest body, string name)
                            : base(service)
                        {
                            Name = name;
                            Body = body;
                            InitParameters();
                        }


                        /// <summary>Required. The resource name of the CryptoKey or CryptoKeyVersion to use for
                        /// encryption.
                        ///
                        /// If a CryptoKey is specified, the server will use its primary version.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Name { get; private set; }


                        /// <summary>Gets or sets the body of this request.</summary>
                        Google.Apis.CloudKMS.v1.Data.EncryptRequest Body { get; set; }

                        ///<summary>Returns the body of the request.</summary>
                        protected override object GetBody() { return Body; }

                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "encrypt"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "POST"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+name}:encrypt"; }
                        }

                        /// <summary>Initializes Encrypt parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "name", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "name",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/.+$",
                                });
                        }

                    }

                    /// <summary>Returns metadata for a given CryptoKey, as well as its primary
                    /// CryptoKeyVersion.</summary>
                    /// <param name="name">The name of the CryptoKey to get.</param>
                    public virtual GetRequest Get(string name)
                    {
                        return new GetRequest(service, name);
                    }

                    /// <summary>Returns metadata for a given CryptoKey, as well as its primary
                    /// CryptoKeyVersion.</summary>
                    public class GetRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKey>
                    {
                        /// <summary>Constructs a new Get request.</summary>
                        public GetRequest(Google.Apis.Services.IClientService service, string name)
                            : base(service)
                        {
                            Name = name;
                            InitParameters();
                        }


                        /// <summary>The name of the CryptoKey to get.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Name { get; private set; }


                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "get"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "GET"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+name}"; }
                        }

                        /// <summary>Initializes Get parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "name", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "name",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                });
                        }

                    }

                    /// <summary>Gets the access control policy for a resource. Returns an empty policy if the resource
                    /// exists and does not have a policy set.</summary>
                    /// <param name="resource">REQUIRED: The resource for which the policy is being requested. See the operation
                    /// documentation for the appropriate value for this field.</param>
                    public virtual GetIamPolicyRequest GetIamPolicy(string resource)
                    {
                        return new GetIamPolicyRequest(service, resource);
                    }

                    /// <summary>Gets the access control policy for a resource. Returns an empty policy if the resource
                    /// exists and does not have a policy set.</summary>
                    public class GetIamPolicyRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.Policy>
                    {
                        /// <summary>Constructs a new GetIamPolicy request.</summary>
                        public GetIamPolicyRequest(Google.Apis.Services.IClientService service, string resource)
                            : base(service)
                        {
                            Resource = resource;
                            InitParameters();
                        }


                        /// <summary>REQUIRED: The resource for which the policy is being requested. See the operation
                        /// documentation for the appropriate value for this field.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("resource", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Resource { get; private set; }


                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "getIamPolicy"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "GET"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+resource}:getIamPolicy"; }
                        }

                        /// <summary>Initializes GetIamPolicy parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "resource", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "resource",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                });
                        }

                    }

                    /// <summary>Lists CryptoKeys.</summary>
                    /// <param name="parent">Required. The resource name of the KeyRing to list, in the format
                    /// `projects/locations/keyRings`.</param>
                    public virtual ListRequest List(string parent)
                    {
                        return new ListRequest(service, parent);
                    }

                    /// <summary>Lists CryptoKeys.</summary>
                    public class ListRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.ListCryptoKeysResponse>
                    {
                        /// <summary>Constructs a new List request.</summary>
                        public ListRequest(Google.Apis.Services.IClientService service, string parent)
                            : base(service)
                        {
                            Parent = parent;
                            InitParameters();
                        }


                        /// <summary>Required. The resource name of the KeyRing to list, in the format
                        /// `projects/locations/keyRings`.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("parent", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Parent { get; private set; }

                        /// <summary>Optional pagination token, returned earlier via
                        /// ListCryptoKeysResponse.next_page_token.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                        public virtual string PageToken { get; set; }

                        /// <summary>Optional limit on the number of CryptoKeys to include in the response.  Further
                        /// CryptoKeys can subsequently be obtained by including the
                        /// ListCryptoKeysResponse.next_page_token in a subsequent request.  If unspecified, the server
                        /// will pick an appropriate default.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("pageSize", Google.Apis.Util.RequestParameterType.Query)]
                        public virtual System.Nullable<int> PageSize { get; set; }


                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "list"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "GET"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+parent}/cryptoKeys"; }
                        }

                        /// <summary>Initializes List parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "parent", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "parent",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$",
                                });
                            RequestParameters.Add(
                                "pageToken", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "pageToken",
                                    IsRequired = false,
                                    ParameterType = "query",
                                    DefaultValue = null,
                                    Pattern = null,
                                });
                            RequestParameters.Add(
                                "pageSize", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "pageSize",
                                    IsRequired = false,
                                    ParameterType = "query",
                                    DefaultValue = null,
                                    Pattern = null,
                                });
                        }

                    }

                    /// <summary>Update a CryptoKey.</summary>
                    /// <param name="body">The body of the request.</param>
                    /// <param name="name">Output only. The resource name for this CryptoKey in the format
                    /// `projects/locations/keyRings/cryptoKeys`.</param>
                    public virtual PatchRequest Patch(Google.Apis.CloudKMS.v1.Data.CryptoKey body, string name)
                    {
                        return new PatchRequest(service, body, name);
                    }

                    /// <summary>Update a CryptoKey.</summary>
                    public class PatchRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKey>
                    {
                        /// <summary>Constructs a new Patch request.</summary>
                        public PatchRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.CryptoKey body, string name)
                            : base(service)
                        {
                            Name = name;
                            Body = body;
                            InitParameters();
                        }


                        /// <summary>Output only. The resource name for this CryptoKey in the format
                        /// `projects/locations/keyRings/cryptoKeys`.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Name { get; private set; }

                        /// <summary>Required list of fields to be updated in this request.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("updateMask", Google.Apis.Util.RequestParameterType.Query)]
                        public virtual object UpdateMask { get; set; }


                        /// <summary>Gets or sets the body of this request.</summary>
                        Google.Apis.CloudKMS.v1.Data.CryptoKey Body { get; set; }

                        ///<summary>Returns the body of the request.</summary>
                        protected override object GetBody() { return Body; }

                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "patch"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "PATCH"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+name}"; }
                        }

                        /// <summary>Initializes Patch parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "name", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "name",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                });
                            RequestParameters.Add(
                                "updateMask", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "updateMask",
                                    IsRequired = false,
                                    ParameterType = "query",
                                    DefaultValue = null,
                                    Pattern = null,
                                });
                        }

                    }

                    /// <summary>Sets the access control policy on the specified resource. Replaces any existing
                    /// policy.</summary>
                    /// <param name="body">The body of the request.</param>
                    /// <param name="resource">REQUIRED: The resource for which the policy is being specified. See the operation
                    /// documentation for the appropriate value for this field.</param>
                    public virtual SetIamPolicyRequest SetIamPolicy(Google.Apis.CloudKMS.v1.Data.SetIamPolicyRequest body, string resource)
                    {
                        return new SetIamPolicyRequest(service, body, resource);
                    }

                    /// <summary>Sets the access control policy on the specified resource. Replaces any existing
                    /// policy.</summary>
                    public class SetIamPolicyRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.Policy>
                    {
                        /// <summary>Constructs a new SetIamPolicy request.</summary>
                        public SetIamPolicyRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.SetIamPolicyRequest body, string resource)
                            : base(service)
                        {
                            Resource = resource;
                            Body = body;
                            InitParameters();
                        }


                        /// <summary>REQUIRED: The resource for which the policy is being specified. See the operation
                        /// documentation for the appropriate value for this field.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("resource", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Resource { get; private set; }


                        /// <summary>Gets or sets the body of this request.</summary>
                        Google.Apis.CloudKMS.v1.Data.SetIamPolicyRequest Body { get; set; }

                        ///<summary>Returns the body of the request.</summary>
                        protected override object GetBody() { return Body; }

                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "setIamPolicy"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "POST"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+resource}:setIamPolicy"; }
                        }

                        /// <summary>Initializes SetIamPolicy parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "resource", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "resource",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                });
                        }

                    }

                    /// <summary>Returns permissions that a caller has on the specified resource. If the resource does
                    /// not exist, this will return an empty set of permissions, not a NOT_FOUND error.
                    ///
                    /// Note: This operation is designed to be used for building permission-aware UIs and command-line
                    /// tools, not for authorization checking. This operation may "fail open" without warning.</summary>
                    /// <param name="body">The body of the request.</param>
                    /// <param name="resource">REQUIRED: The resource for which the policy detail is being requested. See the operation
                    /// documentation for the appropriate value for this field.</param>
                    public virtual TestIamPermissionsRequest TestIamPermissions(Google.Apis.CloudKMS.v1.Data.TestIamPermissionsRequest body, string resource)
                    {
                        return new TestIamPermissionsRequest(service, body, resource);
                    }

                    /// <summary>Returns permissions that a caller has on the specified resource. If the resource does
                    /// not exist, this will return an empty set of permissions, not a NOT_FOUND error.
                    ///
                    /// Note: This operation is designed to be used for building permission-aware UIs and command-line
                    /// tools, not for authorization checking. This operation may "fail open" without warning.</summary>
                    public class TestIamPermissionsRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.TestIamPermissionsResponse>
                    {
                        /// <summary>Constructs a new TestIamPermissions request.</summary>
                        public TestIamPermissionsRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.TestIamPermissionsRequest body, string resource)
                            : base(service)
                        {
                            Resource = resource;
                            Body = body;
                            InitParameters();
                        }


                        /// <summary>REQUIRED: The resource for which the policy detail is being requested. See the
                        /// operation documentation for the appropriate value for this field.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("resource", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Resource { get; private set; }


                        /// <summary>Gets or sets the body of this request.</summary>
                        Google.Apis.CloudKMS.v1.Data.TestIamPermissionsRequest Body { get; set; }

                        ///<summary>Returns the body of the request.</summary>
                        protected override object GetBody() { return Body; }

                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "testIamPermissions"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "POST"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+resource}:testIamPermissions"; }
                        }

                        /// <summary>Initializes TestIamPermissions parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "resource", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "resource",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                });
                        }

                    }

                    /// <summary>Update the version of a CryptoKey that will be used in Encrypt</summary>
                    /// <param name="body">The body of the request.</param>
                    /// <param name="name">The resource name of the CryptoKey to update.</param>
                    public virtual UpdatePrimaryVersionRequest UpdatePrimaryVersion(Google.Apis.CloudKMS.v1.Data.UpdateCryptoKeyPrimaryVersionRequest body, string name)
                    {
                        return new UpdatePrimaryVersionRequest(service, body, name);
                    }

                    /// <summary>Update the version of a CryptoKey that will be used in Encrypt</summary>
                    public class UpdatePrimaryVersionRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.CryptoKey>
                    {
                        /// <summary>Constructs a new UpdatePrimaryVersion request.</summary>
                        public UpdatePrimaryVersionRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.UpdateCryptoKeyPrimaryVersionRequest body, string name)
                            : base(service)
                        {
                            Name = name;
                            Body = body;
                            InitParameters();
                        }


                        /// <summary>The resource name of the CryptoKey to update.</summary>
                        [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                        public virtual string Name { get; private set; }


                        /// <summary>Gets or sets the body of this request.</summary>
                        Google.Apis.CloudKMS.v1.Data.UpdateCryptoKeyPrimaryVersionRequest Body { get; set; }

                        ///<summary>Returns the body of the request.</summary>
                        protected override object GetBody() { return Body; }

                        ///<summary>Gets the method name.</summary>
                        public override string MethodName
                        {
                            get { return "updatePrimaryVersion"; }
                        }

                        ///<summary>Gets the HTTP method.</summary>
                        public override string HttpMethod
                        {
                            get { return "POST"; }
                        }

                        ///<summary>Gets the REST path.</summary>
                        public override string RestPath
                        {
                            get { return "v1/{+name}:updatePrimaryVersion"; }
                        }

                        /// <summary>Initializes UpdatePrimaryVersion parameter list.</summary>
                        protected override void InitParameters()
                        {
                            base.InitParameters();

                            RequestParameters.Add(
                                "name", new Google.Apis.Discovery.Parameter
                                {
                                    Name = "name",
                                    IsRequired = true,
                                    ParameterType = "path",
                                    DefaultValue = null,
                                    Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$",
                                });
                        }

                    }
                }

                /// <summary>Create a new KeyRing in a given Project and Location.</summary>
                /// <param name="body">The body of the request.</param>
                /// <param name="parent">Required. The resource name of the location associated with the KeyRings, in the format
                /// `projects/locations`.</param>
                public virtual CreateRequest Create(Google.Apis.CloudKMS.v1.Data.KeyRing body, string parent)
                {
                    return new CreateRequest(service, body, parent);
                }

                /// <summary>Create a new KeyRing in a given Project and Location.</summary>
                public class CreateRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.KeyRing>
                {
                    /// <summary>Constructs a new Create request.</summary>
                    public CreateRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.KeyRing body, string parent)
                        : base(service)
                    {
                        Parent = parent;
                        Body = body;
                        InitParameters();
                    }


                    /// <summary>Required. The resource name of the location associated with the KeyRings, in the format
                    /// `projects/locations`.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("parent", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string Parent { get; private set; }

                    /// <summary>Required. It must be unique within a location and match the regular expression
                    /// `[a-zA-Z0-9_-]{1,63}`</summary>
                    [Google.Apis.Util.RequestParameterAttribute("keyRingId", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual string KeyRingId { get; set; }


                    /// <summary>Gets or sets the body of this request.</summary>
                    Google.Apis.CloudKMS.v1.Data.KeyRing Body { get; set; }

                    ///<summary>Returns the body of the request.</summary>
                    protected override object GetBody() { return Body; }

                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "create"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "POST"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "v1/{+parent}/keyRings"; }
                    }

                    /// <summary>Initializes Create parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "parent", new Google.Apis.Discovery.Parameter
                            {
                                Name = "parent",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = @"^projects/[^/]+/locations/[^/]+$",
                            });
                        RequestParameters.Add(
                            "keyRingId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "keyRingId",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                    }

                }

                /// <summary>Returns metadata for a given KeyRing.</summary>
                /// <param name="name">The name of the KeyRing to get.</param>
                public virtual GetRequest Get(string name)
                {
                    return new GetRequest(service, name);
                }

                /// <summary>Returns metadata for a given KeyRing.</summary>
                public class GetRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.KeyRing>
                {
                    /// <summary>Constructs a new Get request.</summary>
                    public GetRequest(Google.Apis.Services.IClientService service, string name)
                        : base(service)
                    {
                        Name = name;
                        InitParameters();
                    }


                    /// <summary>The name of the KeyRing to get.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string Name { get; private set; }


                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "get"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "GET"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "v1/{+name}"; }
                    }

                    /// <summary>Initializes Get parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "name", new Google.Apis.Discovery.Parameter
                            {
                                Name = "name",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$",
                            });
                    }

                }

                /// <summary>Gets the access control policy for a resource. Returns an empty policy if the resource
                /// exists and does not have a policy set.</summary>
                /// <param name="resource">REQUIRED: The resource for which the policy is being requested. See the operation
                /// documentation for the appropriate value for this field.</param>
                public virtual GetIamPolicyRequest GetIamPolicy(string resource)
                {
                    return new GetIamPolicyRequest(service, resource);
                }

                /// <summary>Gets the access control policy for a resource. Returns an empty policy if the resource
                /// exists and does not have a policy set.</summary>
                public class GetIamPolicyRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.Policy>
                {
                    /// <summary>Constructs a new GetIamPolicy request.</summary>
                    public GetIamPolicyRequest(Google.Apis.Services.IClientService service, string resource)
                        : base(service)
                    {
                        Resource = resource;
                        InitParameters();
                    }


                    /// <summary>REQUIRED: The resource for which the policy is being requested. See the operation
                    /// documentation for the appropriate value for this field.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("resource", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string Resource { get; private set; }


                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "getIamPolicy"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "GET"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "v1/{+resource}:getIamPolicy"; }
                    }

                    /// <summary>Initializes GetIamPolicy parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "resource", new Google.Apis.Discovery.Parameter
                            {
                                Name = "resource",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$",
                            });
                    }

                }

                /// <summary>Lists KeyRings.</summary>
                /// <param name="parent">Required. The resource name of the location associated with the KeyRings, in the format
                /// `projects/locations`.</param>
                public virtual ListRequest List(string parent)
                {
                    return new ListRequest(service, parent);
                }

                /// <summary>Lists KeyRings.</summary>
                public class ListRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.ListKeyRingsResponse>
                {
                    /// <summary>Constructs a new List request.</summary>
                    public ListRequest(Google.Apis.Services.IClientService service, string parent)
                        : base(service)
                    {
                        Parent = parent;
                        InitParameters();
                    }


                    /// <summary>Required. The resource name of the location associated with the KeyRings, in the format
                    /// `projects/locations`.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("parent", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string Parent { get; private set; }

                    /// <summary>Optional pagination token, returned earlier via
                    /// ListKeyRingsResponse.next_page_token.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual string PageToken { get; set; }

                    /// <summary>Optional limit on the number of KeyRings to include in the response.  Further KeyRings
                    /// can subsequently be obtained by including the ListKeyRingsResponse.next_page_token in a
                    /// subsequent request.  If unspecified, the server will pick an appropriate default.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("pageSize", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual System.Nullable<int> PageSize { get; set; }


                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "list"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "GET"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "v1/{+parent}/keyRings"; }
                    }

                    /// <summary>Initializes List parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "parent", new Google.Apis.Discovery.Parameter
                            {
                                Name = "parent",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = @"^projects/[^/]+/locations/[^/]+$",
                            });
                        RequestParameters.Add(
                            "pageToken", new Google.Apis.Discovery.Parameter
                            {
                                Name = "pageToken",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "pageSize", new Google.Apis.Discovery.Parameter
                            {
                                Name = "pageSize",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                    }

                }

                /// <summary>Sets the access control policy on the specified resource. Replaces any existing
                /// policy.</summary>
                /// <param name="body">The body of the request.</param>
                /// <param name="resource">REQUIRED: The resource for which the policy is being specified. See the operation
                /// documentation for the appropriate value for this field.</param>
                public virtual SetIamPolicyRequest SetIamPolicy(Google.Apis.CloudKMS.v1.Data.SetIamPolicyRequest body, string resource)
                {
                    return new SetIamPolicyRequest(service, body, resource);
                }

                /// <summary>Sets the access control policy on the specified resource. Replaces any existing
                /// policy.</summary>
                public class SetIamPolicyRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.Policy>
                {
                    /// <summary>Constructs a new SetIamPolicy request.</summary>
                    public SetIamPolicyRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.SetIamPolicyRequest body, string resource)
                        : base(service)
                    {
                        Resource = resource;
                        Body = body;
                        InitParameters();
                    }


                    /// <summary>REQUIRED: The resource for which the policy is being specified. See the operation
                    /// documentation for the appropriate value for this field.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("resource", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string Resource { get; private set; }


                    /// <summary>Gets or sets the body of this request.</summary>
                    Google.Apis.CloudKMS.v1.Data.SetIamPolicyRequest Body { get; set; }

                    ///<summary>Returns the body of the request.</summary>
                    protected override object GetBody() { return Body; }

                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "setIamPolicy"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "POST"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "v1/{+resource}:setIamPolicy"; }
                    }

                    /// <summary>Initializes SetIamPolicy parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "resource", new Google.Apis.Discovery.Parameter
                            {
                                Name = "resource",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$",
                            });
                    }

                }

                /// <summary>Returns permissions that a caller has on the specified resource. If the resource does not
                /// exist, this will return an empty set of permissions, not a NOT_FOUND error.
                ///
                /// Note: This operation is designed to be used for building permission-aware UIs and command-line
                /// tools, not for authorization checking. This operation may "fail open" without warning.</summary>
                /// <param name="body">The body of the request.</param>
                /// <param name="resource">REQUIRED: The resource for which the policy detail is being requested. See the operation
                /// documentation for the appropriate value for this field.</param>
                public virtual TestIamPermissionsRequest TestIamPermissions(Google.Apis.CloudKMS.v1.Data.TestIamPermissionsRequest body, string resource)
                {
                    return new TestIamPermissionsRequest(service, body, resource);
                }

                /// <summary>Returns permissions that a caller has on the specified resource. If the resource does not
                /// exist, this will return an empty set of permissions, not a NOT_FOUND error.
                ///
                /// Note: This operation is designed to be used for building permission-aware UIs and command-line
                /// tools, not for authorization checking. This operation may "fail open" without warning.</summary>
                public class TestIamPermissionsRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.TestIamPermissionsResponse>
                {
                    /// <summary>Constructs a new TestIamPermissions request.</summary>
                    public TestIamPermissionsRequest(Google.Apis.Services.IClientService service, Google.Apis.CloudKMS.v1.Data.TestIamPermissionsRequest body, string resource)
                        : base(service)
                    {
                        Resource = resource;
                        Body = body;
                        InitParameters();
                    }


                    /// <summary>REQUIRED: The resource for which the policy detail is being requested. See the
                    /// operation documentation for the appropriate value for this field.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("resource", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string Resource { get; private set; }


                    /// <summary>Gets or sets the body of this request.</summary>
                    Google.Apis.CloudKMS.v1.Data.TestIamPermissionsRequest Body { get; set; }

                    ///<summary>Returns the body of the request.</summary>
                    protected override object GetBody() { return Body; }

                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "testIamPermissions"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "POST"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "v1/{+resource}:testIamPermissions"; }
                    }

                    /// <summary>Initializes TestIamPermissions parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "resource", new Google.Apis.Discovery.Parameter
                            {
                                Name = "resource",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = @"^projects/[^/]+/locations/[^/]+/keyRings/[^/]+$",
                            });
                    }

                }
            }

            /// <summary>Get information about a location.</summary>
            /// <param name="name">Resource name for the location.</param>
            public virtual GetRequest Get(string name)
            {
                return new GetRequest(service, name);
            }

            /// <summary>Get information about a location.</summary>
            public class GetRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.Location>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>Resource name for the location.</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+/locations/[^/]+$",
                        });
                }

            }

            /// <summary>Lists information about the supported locations for this service.</summary>
            /// <param name="name">The resource that owns the locations collection, if applicable.</param>
            public virtual ListRequest List(string name)
            {
                return new ListRequest(service, name);
            }

            /// <summary>Lists information about the supported locations for this service.</summary>
            public class ListRequest : CloudKMSBaseServiceRequest<Google.Apis.CloudKMS.v1.Data.ListLocationsResponse>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string name)
                    : base(service)
                {
                    Name = name;
                    InitParameters();
                }


                /// <summary>The resource that owns the locations collection, if applicable.</summary>
                [Google.Apis.Util.RequestParameterAttribute("name", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string Name { get; private set; }

                /// <summary>The standard list filter.</summary>
                [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Filter { get; set; }

                /// <summary>The standard list page token.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }

                /// <summary>The standard list page size.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageSize", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> PageSize { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "v1/{+name}/locations"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "name", new Google.Apis.Discovery.Parameter
                        {
                            Name = "name",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = @"^projects/[^/]+$",
                        });
                    RequestParameters.Add(
                        "filter", new Google.Apis.Discovery.Parameter
                        {
                            Name = "filter",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageSize", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageSize",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
    }
}

namespace Google.Apis.CloudKMS.v1.Data
{    

    /// <summary>Specifies the audit configuration for a service. The configuration determines which permission types
    /// are logged, and what identities, if any, are exempted from logging. An AuditConifg must have one or more
    /// AuditLogConfigs.
    ///
    /// If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is
    /// used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each
    /// AuditConfig are exempted. Example Policy with multiple AuditConfigs: { "audit_configs": [ { "service":
    /// "allServices" "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] },
    /// { "log_type": "DATA_WRITE", }, { "log_type": "ADMIN_READ", } ] }, { "service": "fooservice@googleapis.com"
    /// "audit_log_configs": [ { "log_type": "DATA_READ", }, { "log_type": "DATA_WRITE", "exempted_members": [
    /// "user:bar@gmail.com" ] } ] } ] } For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
    /// logging. It also exempts foo@gmail.com from DATA_READ logging, and bar@gmail.com from DATA_WRITE
    /// logging.</summary>
    public class AuditConfig : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The configuration for logging of each type of permission. Next ID: 4</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("auditLogConfigs")]
        public virtual System.Collections.Generic.IList<AuditLogConfig> AuditLogConfigs { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("exemptedMembers")]
        public virtual System.Collections.Generic.IList<string> ExemptedMembers { get; set; } 

        /// <summary>Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`,
        /// `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("service")]
        public virtual string Service { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Provides the configuration for logging a type of permissions. Example:
    ///
    /// { "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ "user:foo@gmail.com" ] }, {
    /// "log_type": "DATA_WRITE", } ] }
    ///
    /// This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting foo@gmail.com from DATA_READ
    /// logging.</summary>
    public class AuditLogConfig : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Specifies the identities that do not cause logging for this type of permission. Follows the same
        /// format of Binding.members.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("exemptedMembers")]
        public virtual System.Collections.Generic.IList<string> ExemptedMembers { get; set; } 

        /// <summary>The log type that this config enables.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("logType")]
        public virtual string LogType { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Associates `members` with a `role`.</summary>
    public class Binding : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Specifies the identities requesting access for a Cloud Platform resource. `members` can have the
        /// following values:
        ///
        /// * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google
        /// account.
        ///
        /// * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google
        /// account or a service account.
        ///
        /// * `user:{emailid}`: An email address that represents a specific Google account. For example,
        /// `alice@gmail.com` or `joe@example.com`.
        ///
        /// * `serviceAccount:{emailid}`: An email address that represents a service account. For example, `my-other-
        /// app@appspot.gserviceaccount.com`.
        ///
        /// * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`.
        ///
        /// * `domain:{domain}`: A Google Apps domain name that represents all the users of that domain. For example,
        /// `google.com` or `example.com`.
        ///
        /// </summary>
        [Newtonsoft.Json.JsonPropertyAttribute("members")]
        public virtual System.Collections.Generic.IList<string> Members { get; set; } 

        /// <summary>Role that is assigned to `members`. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
        /// Required</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("role")]
        public virtual string Role { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Write a Cloud Audit log</summary>
    public class CloudAuditOptions : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A condition to be met.</summary>
    public class Condition : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Trusted attributes supplied by the IAM system.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("iam")]
        public virtual string Iam { get; set; } 

        /// <summary>An operator to apply the subject with.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("op")]
        public virtual string Op { get; set; } 

        /// <summary>Trusted attributes discharged by the service.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("svc")]
        public virtual string Svc { get; set; } 

        /// <summary>Trusted attributes supplied by any service that owns resources and uses the IAM system for access
        /// control.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("sys")]
        public virtual string Sys { get; set; } 

        /// <summary>DEPRECATED. Use 'values' instead.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("value")]
        public virtual string Value { get; set; } 

        /// <summary>The objects of the condition. This is mutually exclusive with 'value'.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("values")]
        public virtual System.Collections.Generic.IList<string> Values { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Options for counters</summary>
    public class CounterOptions : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The field value to attribute.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("field")]
        public virtual string Field { get; set; } 

        /// <summary>The metric to update.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metric")]
        public virtual string Metric { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A CryptoKey represents a logical key that can be used for cryptographic operations.
    ///
    /// A CryptoKey is made up of one or more versions, which represent the actual key material used in cryptographic
    /// operations.</summary>
    public class CryptoKey : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Output only. The time at which this CryptoKey was created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createTime")]
        public virtual object CreateTime { get; set; } 

        /// <summary>Output only. The resource name for this CryptoKey in the format
        /// `projects/locations/keyRings/cryptoKeys`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>At next_rotation_time, the Key Management Service will automatically:
        ///
        /// 1. Create a new version of this CryptoKey. 2. Mark the new version as primary.
        ///
        /// Key rotations performed manually via CreateCryptoKeyVersion and UpdateCryptoKeyPrimaryVersion do not affect
        /// next_rotation_time.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextRotationTime")]
        public virtual object NextRotationTime { get; set; } 

        /// <summary>Output only. A copy of the "primary" CryptoKeyVersion that will be used by Encrypt when this
        /// CryptoKey is given in EncryptRequest.name.
        ///
        /// The CryptoKey's primary version can be updated via UpdateCryptoKeyPrimaryVersion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("primary")]
        public virtual CryptoKeyVersion Primary { get; set; } 

        /// <summary>The immutable purpose of this CryptoKey. Currently, the only acceptable purpose is
        /// ENCRYPT_DECRYPT.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("purpose")]
        public virtual string Purpose { get; set; } 

        /// <summary>next_rotation_time will be advanced by this period when the service automatically rotates a key.
        /// Must be at least one day.
        ///
        /// If rotation_period is set, next_rotation_time must also be set.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rotationPeriod")]
        public virtual object RotationPeriod { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A CryptoKeyVersion represents an individual cryptographic key, and the associated key material.
    ///
    /// It can be used for cryptographic operations either directly, or via its parent CryptoKey, in which case the
    /// server will choose the appropriate version for the operation.</summary>
    public class CryptoKeyVersion : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Output only. The time at which this CryptoKeyVersion was created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createTime")]
        public virtual object CreateTime { get; set; } 

        /// <summary>Output only. The time this CryptoKeyVersion's key material was destroyed. Only present if state is
        /// DESTROYED.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destroyEventTime")]
        public virtual object DestroyEventTime { get; set; } 

        /// <summary>Output only. The time this CryptoKeyVersion's key material is scheduled for destruction. Only
        /// present if state is DESTROY_SCHEDULED.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("destroyTime")]
        public virtual object DestroyTime { get; set; } 

        /// <summary>Output only. The resource name for this CryptoKeyVersion in the format
        /// `projects/locations/keyRings/cryptoKeys/cryptoKeyVersions`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The current state of the CryptoKeyVersion.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("state")]
        public virtual string State { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Write a Data Access (Gin) log</summary>
    public class DataAccessOptions : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for KeyManagementService.Decrypt.</summary>
    public class DecryptRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Optional data that must match the data originally supplied in
        /// EncryptRequest.additional_authenticated_data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("additionalAuthenticatedData")]
        public virtual string AdditionalAuthenticatedData { get; set; } 

        /// <summary>Required. The encrypted data originally returned in EncryptResponse.ciphertext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ciphertext")]
        public virtual string Ciphertext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for KeyManagementService.Decrypt.</summary>
    public class DecryptResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The decrypted data originally supplied in EncryptRequest.plaintext.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("plaintext")]
        public virtual string Plaintext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for KeyManagementService.DestroyCryptoKeyVersion.</summary>
    public class DestroyCryptoKeyVersionRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for KeyManagementService.Encrypt.</summary>
    public class EncryptRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Optional data that, if specified, must also be provided during decryption through
        /// DecryptRequest.additional_authenticated_data.  Must be no larger than 64KiB.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("additionalAuthenticatedData")]
        public virtual string AdditionalAuthenticatedData { get; set; } 

        /// <summary>Required. The data to encrypt. Must be no larger than 64KiB.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("plaintext")]
        public virtual string Plaintext { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for KeyManagementService.Encrypt.</summary>
    public class EncryptResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The encrypted data.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("ciphertext")]
        public virtual string Ciphertext { get; set; } 

        /// <summary>The resource name of the CryptoKeyVersion used in encryption.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A KeyRing is a toplevel logical grouping of CryptoKeys.</summary>
    public class KeyRing : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Output only. The time at which this KeyRing was created.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("createTime")]
        public virtual object CreateTime { get; set; } 

        /// <summary>Output only. The resource name for the KeyRing in the format
        /// `projects/locations/keyRings`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for KeyManagementService.ListCryptoKeyVersions.</summary>
    public class ListCryptoKeyVersionsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of CryptoKeyVersions.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cryptoKeyVersions")]
        public virtual System.Collections.Generic.IList<CryptoKeyVersion> CryptoKeyVersions { get; set; } 

        /// <summary>A token to retrieve next page of results. Pass this value in
        /// ListCryptoKeyVersionsRequest.page_token to retrieve the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The total number of CryptoKeyVersions that matched the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalSize")]
        public virtual System.Nullable<int> TotalSize { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for KeyManagementService.ListCryptoKeys.</summary>
    public class ListCryptoKeysResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of CryptoKeys.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cryptoKeys")]
        public virtual System.Collections.Generic.IList<CryptoKey> CryptoKeys { get; set; } 

        /// <summary>A token to retrieve next page of results. Pass this value in ListCryptoKeysRequest.page_token to
        /// retrieve the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The total number of CryptoKeys that matched the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalSize")]
        public virtual System.Nullable<int> TotalSize { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for KeyManagementService.ListKeyRings.</summary>
    public class ListKeyRingsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The list of KeyRings.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("keyRings")]
        public virtual System.Collections.Generic.IList<KeyRing> KeyRings { get; set; } 

        /// <summary>A token to retrieve next page of results. Pass this value in ListKeyRingsRequest.page_token to
        /// retrieve the next page of results.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The total number of KeyRings that matched the query.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalSize")]
        public virtual System.Nullable<int> TotalSize { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>The response message for Locations.ListLocations.</summary>
    public class ListLocationsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A list of locations that matches the specified filter in the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("locations")]
        public virtual System.Collections.Generic.IList<Location> Locations { get; set; } 

        /// <summary>The standard List next-page token.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A resource that represents Google Cloud Platform location.</summary>
    public class Location : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Cross-service attributes for the location. For example
        ///
        /// {"cloud.googleapis.com/region": "us-east1"}</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("labels")]
        public virtual System.Collections.Generic.IDictionary<string,string> Labels { get; set; } 

        /// <summary>The canonical id for this location. For example: `"us-east1"`.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("locationId")]
        public virtual string LocationId { get; set; } 

        /// <summary>Service-specific metadata. For example the available capacity at the given location.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("metadata")]
        public virtual System.Collections.Generic.IDictionary<string,object> Metadata { get; set; } 

        /// <summary>Resource name for the location, which may vary between implementations. For example: `"projects
        /// /example-project/locations/us-east1"`</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Specifies what kind of log the caller must write Increment a streamz counter with the specified metric
    /// and field names.
    ///
    /// Metric names should start with a '/', generally be lowercase-only, and end in "_count". Field names should not
    /// contain an initial slash. The actual exported metric names will have "/iam/policy" prepended.
    ///
    /// Field names correspond to IAM request parameters and field values are their respective values.
    ///
    /// At present the only supported field names are - "iam_principal", corresponding to IAMContext.principal; - ""
    /// (empty string), resulting in one aggretated counter with no field.
    ///
    /// Examples: counter { metric: "/debug_access_count"  field: "iam_principal" } ==> increment counter
    /// /iam/policy/backend_debug_access_count {iam_principal=[value of IAMContext.principal]}
    ///
    /// At this time we do not support: * multiple field names (though this may be supported in the future) *
    /// decrementing the counter * incrementing it by anything other than 1</summary>
    public class LogConfig : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Cloud audit options.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cloudAudit")]
        public virtual CloudAuditOptions CloudAudit { get; set; } 

        /// <summary>Counter options.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("counter")]
        public virtual CounterOptions Counter { get; set; } 

        /// <summary>Data access options.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("dataAccess")]
        public virtual DataAccessOptions DataAccess { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Defines an Identity and Access Management (IAM) policy. It is used to specify access control policies
    /// for Cloud Platform resources.
    ///
    /// A `Policy` consists of a list of `bindings`. A `Binding` binds a list of `members` to a `role`, where the
    /// members can be user accounts, Google groups, Google domains, and service accounts. A `role` is a named list of
    /// permissions defined by IAM.
    ///
    /// **Example**
    ///
    /// { "bindings": [ { "role": "roles/owner", "members": [ "user:mike@example.com", "group:admins@example.com",
    /// "domain:google.com", "serviceAccount:my-other-app@appspot.gserviceaccount.com", ] }, { "role": "roles/viewer",
    /// "members": ["user:sean@example.com"] } ] }
    ///
    /// For a description of IAM and its features, see the [IAM developer's
    /// guide](https://cloud.google.com/iam).</summary>
    public class Policy : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Specifies cloud audit logging configuration for this policy.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("auditConfigs")]
        public virtual System.Collections.Generic.IList<AuditConfig> AuditConfigs { get; set; } 

        /// <summary>Associates a list of `members` to a `role`. Multiple `bindings` must not be specified for the same
        /// `role`. `bindings` with no members will result in an error.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("bindings")]
        public virtual System.Collections.Generic.IList<Binding> Bindings { get; set; } 

        /// <summary>`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of
        /// a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the
        /// read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned
        /// in the response to `getIamPolicy`, and systems are expected to put that etag in the request to
        /// `setIamPolicy` to ensure that their change will be applied to the same version of the policy.
        ///
        /// If no `etag` is provided in the call to `setIamPolicy`, then the existing policy is overwritten
        /// blindly.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        [Newtonsoft.Json.JsonPropertyAttribute("iamOwned")]
        public virtual System.Nullable<bool> IamOwned { get; set; } 

        /// <summary>If more than one rule is specified, the rules are applied in the following manner: - All matching
        /// LOG rules are always applied. - If any DENY/DENY_WITH_LOG rule matches, permission is denied. Logging will
        /// be applied if one or more matching rule requires logging. - Otherwise, if any ALLOW/ALLOW_WITH_LOG rule
        /// matches, permission is granted. Logging will be applied if one or more matching rule requires logging. -
        /// Otherwise, if no rule applies, permission is denied.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rules")]
        public virtual System.Collections.Generic.IList<Rule> Rules { get; set; } 

        /// <summary>Version of the `Policy`. The default version is 0.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("version")]
        public virtual System.Nullable<int> Version { get; set; } 

    }    

    /// <summary>Request message for KeyManagementService.RestoreCryptoKeyVersion.</summary>
    public class RestoreCryptoKeyVersionRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>A rule to be applied in a Policy.</summary>
    public class Rule : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Required</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("action")]
        public virtual string Action { get; set; } 

        /// <summary>Additional restrictions that must be met</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("conditions")]
        public virtual System.Collections.Generic.IList<Condition> Conditions { get; set; } 

        /// <summary>Human-readable description of the rule.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("description")]
        public virtual string Description { get; set; } 

        /// <summary>If one or more 'in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR is
        /// in at least one of these entries.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("in")]
        public virtual System.Collections.Generic.IList<string> In__ { get; set; } 

        /// <summary>The config returned to callers of tech.iam.IAM.CheckPolicy for any entries that match the LOG
        /// action.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("logConfig")]
        public virtual System.Collections.Generic.IList<LogConfig> LogConfig { get; set; } 

        /// <summary>If one or more 'not_in' clauses are specified, the rule matches if the PRINCIPAL/AUTHORITY_SELECTOR
        /// is in none of the entries. The format for in and not_in entries is the same as for members in a Binding (see
        /// google/iam/v1/policy.proto).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("notIn")]
        public virtual System.Collections.Generic.IList<string> NotIn { get; set; } 

        /// <summary>A permission is a string of form '..' (e.g., 'storage.buckets.list'). A value of '*' matches all
        /// permissions, and a verb part of '*' (e.g., 'storage.buckets.*') matches all verbs.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permissions")]
        public virtual System.Collections.Generic.IList<string> Permissions { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for `SetIamPolicy` method.</summary>
    public class SetIamPolicyRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to
        /// a few 10s of KB. An empty policy is a valid policy but certain Cloud Platform services (such as Projects)
        /// might reject them.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("policy")]
        public virtual Policy Policy { get; set; } 

        /// <summary>OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask
        /// will be modified. If no mask is provided, the following default mask is used: paths: "bindings, etag" This
        /// field is only used by Cloud IAM.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("updateMask")]
        public virtual object UpdateMask { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for `TestIamPermissions` method.</summary>
    public class TestIamPermissionsRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The set of permissions to check for the `resource`. Permissions with wildcards (such as '*' or
        /// 'storage.*') are not allowed. For more information see [IAM
        /// Overview](https://cloud.google.com/iam/docs/overview#permissions).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permissions")]
        public virtual System.Collections.Generic.IList<string> Permissions { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Response message for `TestIamPermissions` method.</summary>
    public class TestIamPermissionsResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>A subset of `TestPermissionsRequest.permissions` that the caller is allowed.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("permissions")]
        public virtual System.Collections.Generic.IList<string> Permissions { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    /// <summary>Request message for KeyManagementService.UpdateCryptoKeyPrimaryVersion.</summary>
    public class UpdateCryptoKeyPrimaryVersionRequest : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The id of the child CryptoKeyVersion to use as primary.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("cryptoKeyVersionId")]
        public virtual string CryptoKeyVersionId { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }
}
